package cn.smbms.util;

import org.springframework.core.convert.converter.Converter;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Classname DateController
 * @Description TODO
 * @Date 2020-10-12 11:53
 * @Created by 26440
 */
public class DateController implements Converter<String, Date> {


    public Date convert(String s) {
        try {
            return new SimpleDateFormat("yyyy-MM-dd").parse(s);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
